#!/bin/bash

if [ -f /Applications/Cydia.app/Cydia.bak ]
then
	cp /Applications/Cydia.app/Cydia.bak /Applications/Cydia.app/Cydia
	rm -f /Applications/Cydia.app/Cydia.bak
fi

rm -f /var/mobile/Library/SBSettings/Toggles/NoCyfresh/CydiaRefreshBlocked

declare -a cydia
cydia=($CYDIA)

if [[ $1 == remove ]]; then
    if [[ ${CYDIA+@} ]]; then
        eval "echo 'finish:restart' >&${cydia[0]}"
    fi
fi
exit 0
 
